<?php

$str = 'ancyent marinere';
$isMatched = preg_match('/^(?i)ancyent (?=marinere)$/', $str, $matches);
var_dump($isMatched, $matches);